package com.sixth.controller.api;

import com.sixth.entity.Permission;
import com.sixth.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: self-tui-education
 * @description:
 * @author: 高振杨
 * @create: 2022-04-14 18:10
 **/
@RestController
@RequestMapping("system/api/permission")
public class ApiPremissionController {

    @Autowired
    private PermissionService permissionService;

    @GetMapping("getPermissionByUserid/{userid}")
    public List<Permission> getPermissionByUserid(@PathVariable String userid){
      return   permissionService.getPermissionByUserid(userid);
    }
}
